create  table jms_dm.dm_network_jjj_aging_sign_detail_dt
(
virt_code    varchar(100) COMMENT '虚拟代理区' ,
provider_id   varchar(100) COMMENT '省份id' ,
final_sign_network_code   varchar(100) COMMENT '网点code' ,
district_id   varchar(100) comment '片区id',
virt_name    varchar(100) COMMENT '虚拟代理区' ,
provider_desc   varchar(100) COMMENT '省份' ,
final_sign_network_name    varchar(100) COMMENT '网点' ,
need_sign_sum              varchar(100) COMMENT '应派件量' ,
sign_sum                 varchar(100) COMMENT '时效签收量' ,
aging_agin_rate          decimal(16,4) COMMENT '时效签收率' ,
unsign_sum               varchar(100) COMMENT '未签收量' ,
date_time               date COMMENT '业务日期',
city_id   varchar(100) comment '城市id',
city_desc   varchar(100) comment '城市',
district_desc   varchar(100) comment '片区'
,all_sign_24   int(12) comment '24小时时效签收量'
,active_sign_sum   int(12) comment '当日实际签收量'
day_aging_sign_sum  int(12) comment'当日时效签收量'
)
ENGINE=OLAP
DUPLICATE KEY(virt_code,provider_id,final_sign_network_code,district_id)
comment '机器人播报京津冀网点时效签收明细'
PARTITION BY RANGE (date_time) (
   START ("2023-02-08") END ("2023-04-09") EVERY (INTERVAL 1 day))DISTRIBUTED BY HASH(final_sign_network_code) BUCKETS 2
PROPERTIES (
"replication_num" = "3",
"dynamic_partition.enable" = "true",
"dynamic_partition.time_unit" = "DAY",
"dynamic_partition.time_zone" = "Asia/Shanghai",
"dynamic_partition.start" = "-365",
"dynamic_partition.end" = "3",
"dynamic_partition.prefix" = "p",
"dynamic_partition.buckets" = "2",
"in_memory" = "false",
"storage_format" = "V2"
);

alter table jms_dm.dm_network_jjj_aging_sign_detail_dt add column (
          agent_code varchar(100) comment '代理区code'
         ,agent_name varchar(100) comment '代理区'
    )  ;
